package top.wenzz.commons.annotation;

import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * 查询annotation
 * Created by 钟廷员 on 2016/12/7.
 */
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Query {
    ReadType value() default ReadType.EQ;
    String queryName() default "";

    enum ReadType {
        /**等于*/
        EQ,
        /**全模糊查询*/
        LIKE,
        /**左模糊查询*/
        LLIKE,
        /**右模糊查询*/
        RLIKE,
        /**大于*/
        GT,
        /**小于*/
        LT,
        /**大于等于*/
        GE,
        /**小于等于*/
        LE,
        /**in查询*/
        IN,
        /**between*/
        BETWEEN
    }
}
